package ch5oopexer1;
/*1:圆类有半径属性和圆周率属性，有求面积和周长的方法（把圆周率定义为static），用oop模拟。*/
public class Circle {
     private double  radius;
    static   double pi;

    public Circle() {
    }

    public double getRadius() {
        return radius;
    }


    public void setRadius(double radius) {
        this.radius = radius;
    }

    public double circleArea(){
         return pi*radius*radius;
     }
     public double circlePerimeter(){
         return pi*radius*2;
     }
}
